package com.sky.service;


import com.sky.dto.*;
import com.sky.result.PageResult;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderStatisticsVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;

//订单服务类
public interface OrderService {

    //添加订单
    public OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO);

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    //查询历史订单
    PageResult historyOrders(int page,int pageSize,Integer status);

    //根据订单id查询订单详情
    OrderVO orderDetails(Long id);
    //根据订单id取消订单
    void cancelOrder(Long id);
    //根据订单id再次下单
    void repetition(Long id);
    //商家条件查询订单
    PageResult condditionSearch(OrdersPageQueryDTO ordersPageQueryDTO);
    //商家接单
    void confirm(OrdersConfirmDTO ordersConfirmDTO);
    //商家拒单
    void rejection(OrdersRejectionDTO ordersRejectionDTO);
    //商家取消订单
    void adminCancelOrder(OrdersCancelDTO dto);
    //商家派送订单
    void deliveryOrder(Long id);
    //商家完成订单
    void completeOrder(Long id);
    //统计个状态的数量
    OrderStatisticsVO statisticsOrder();
    //客户催单
    void reminder(Long id);
}
